package com.kizuki.mybatis;


import org.mybatis.spring.SqlSessionTemplate;

public class UserDaoImp implements UserDao {

    private SqlSessionTemplate sqlSessionTemplate;

    public void setSqlSessionTemplate(SqlSessionTemplate sqlSessionTemplate) {
        this.sqlSessionTemplate = sqlSessionTemplate;
    }

    @Override
    public User queryUserById(int id) {
        UserDao mapper = this.sqlSessionTemplate.getMapper(UserDao.class);
        return mapper.queryUserById(id);
    }

}
